package com.yifi.system.service;

import com.jfinal.plugin.activerecord.Db;
import com.yifi.common.utils.DateUtils;

/** 
* @ClassName: PtSysLogService 
* @Description: TODO
* @author 姚善利
* @date 2021-10-21 15:21:15 
*  
*/
public class PtSysLogService {

	//3个月定时清理一次日志表
	public void ThreeMonthDelete()
	{
		String date=DateUtils.parseDateToStr("yyyy-MM-dd",DateUtils.addMonths(DateUtils.getNowDate(),-3));
		String sql="delete from pt_syslog where date_format(enddate,'%Y-%m-%d')<='"+date+"'";
		Db.update(sql);
	}
}
